package net.osweb.core.tools.utils.ftp;

public class FileConfig {

	// 声明�?个静态的类的变量
	private static FileConfig instance = null;
	
	// pdf  文件存放的路�?
	private String pdfPath;
	private String name;
	private String ip;
	private String httpPath;
	private String httpPort;
	private String ftpPath;
	private String ftpPort;
	private String ftpUser;
	private String ftpPassword;
	private String universityName;
	
	
	public String getPdfPath() {
		return pdfPath;
	}

	public void setPdfPath(String pdfPath) {
		this.pdfPath = pdfPath;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getHttpPath() {
		return httpPath;
	}

	public void setHttpPath(String httpPath) {
		this.httpPath = httpPath;
	}

	public String getHttpPort() {
		return httpPort;
	}

	public void setHttpPort(String httpPort) {
		this.httpPort = httpPort;
	}

	public String getFtpPath() {
		return ftpPath;
	}

	public void setFtpPath(String ftpPath) {
		this.ftpPath = ftpPath;
	}

	public String getFtpPort() {
		return ftpPort;
	}

	public void setFtpPort(String ftpPort) {
		this.ftpPort = ftpPort;
	}

	public String getFtpUser() {
		return ftpUser;
	}

	public void setFtpUser(String ftpUser) {
		this.ftpUser = ftpUser;
	}

	public String getFtpPassword() {
		return ftpPassword;
	}

	public void setFtpPassword(String ftpPassword) {
		this.ftpPassword = ftpPassword;
	}

	// 私有的构造方�?
	private FileConfig() {
//		try {
//			File file = new File("FileServerConf.xml");
//			DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
//			DocumentBuilder builder=factory.newDocumentBuilder();
//			Document doc = builder.parse(file); 
//			NodeList nl = doc.getElementsByTagName("server");  
//			for (int i=0;i<nl.getLength();i++){     
//				   
//				String name = doc.getElementsByTagName("name").item(i).getFirstChild().getNodeValue();     
//				String ip = doc.getElementsByTagName("ip").item(i).getFirstChild().getNodeValue();   
//				String httppath = doc.getElementsByTagName("http-path").item(i).getFirstChild().getNodeValue(); 
//				String httpport = doc.getElementsByTagName("http-port").item(i).getFirstChild().getNodeValue();
//				String ftppath = doc.getElementsByTagName("ftp-path").item(i).getFirstChild().getNodeValue();
//				String ftpport = doc.getElementsByTagName("ftp-port").item(i).getFirstChild().getNodeValue();
//				String ftpuser = doc.getElementsByTagName("ftp-user").item(i).getFirstChild().getNodeValue();
//				String ftppassword = doc.getElementsByTagName("ftp-password").item(i).getFirstChild().getNodeValue();
//			}	   
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
	}

	// 公共的静态方法入�?
	public static synchronized FileConfig getInstance() {
		if (null == instance) {
			instance = new FileConfig();
		}
		return instance;
	}

	public String getUniversityName() {
		return universityName;
	}

	public void setUniversityName(String universityName) {
		this.universityName = universityName;
	}

}
